Non-volatile multi-level, semiconductor flash memory device and method of driving same

ABSTRACT

In a nonvolatile semiconductor memory device in which a plurality of threshold values are set to store multi-level data in a memory cell, bits of multi-bit data are separately written into a memory cell according to an address signal or a control signal to effect the reading and erasing. Concretely, the memory array is so constituted that it can be accessed by three-dimensional address of X, Y and Z, and multi-bit data in the memory cell is discriminated by the Z-address.

BACKGROUND OF THE INVENTION

The present invention relates to a semiconductor memory device and,particularly, to a technology that can be particularly effective whenadapted to a memory system for multi-level data in a nonvolatilesemiconductor memory device, such as a nonvolatile memory device(hereinafter simply referred to as a flash memory) which is capable ofelectrically erasing a plurality of stored data at one time.

In a flash memory, a nonvolatile memory element having a control gateand a floating gate is used as a memory cell, and the memory cell isconstituted by a single transistor. In such a flash memory, theprogramming operation is carried out by applying a voltage of about 4V(Volt) to the drain region of the nonvolatile memory element, as shownin FIG. 21, applying a voltage of about −10 V to a word line to which acontrol gate CG is connected, and discharging the electric charge fromthe floating gate FG by using a tunneling current to establish a stateof a low threshold voltage (logic “0”). To carry out the erasingoperation, as shown in FIG. 22, a voltage of about −3 V is applied tothe well region, to the drain region and to the source region, and avoltage of as high as 10 V is applied to the control gate CG to generatea tunneling current in order to inject a negative charge into thefloating gate FG and to maintain a high threshold value (logic “1”).Thus, data of one bit is stored in a memory cell.

There has been proposed the concept of a so-called “multi-level” memoryto store data of two or more bits in a single memory cell in order toincrease the storage capacity. An example of such a multi-level memoryhas been disclosed in, for example, Japanese Patent Application H7-14031(14031/1995) which corresponds to U.S. patent application Ser.No.08/860,793.

In such a multi-level memory of the above-mentioned patent application,consecutive two-bit data “01”, “00”, “10” and “11” are subjected tological conversion, and are stored correspondedly to one of thethreshold voltage ranges of 1.2 V or lower, 1.6 to 2.3 V, 2.8 to 3.5 V,and 4 V or higher of the memory cell as shown in FIG. 23. In theabove-mentioned memory, therefore, it is impossible to identify thestored data unless a reading operation is executed three times whilesuccessively changing the level of the word line to, e.g., 1.4 V, 2.6 V,3.7 V, causing a drawback in that a long time is needed to read thedata.

SUMMARY OF THE INVENTION

The object of the present invention is to provide a multi-levelstorage-type nonvolatile semiconductor memory device for which thereading time can be shortened by decreasing the number of accesses tothe word line when reading the data, and a method of driving such adevice.

The above and other objects, and novel features of the present inventionwill become obvious from the following description and the accompanyingdrawings.

The outline of a representative example of the invention disclosed inthis application will be described below.

That is, in a nonvolatile semiconductor memory device in which aplurality of threshold values are set to store multi-level data in amemory cell, each bit of multi-bit data is separately written into amemory cell depending upon an address signal or a control signal and thebits are stored hierarchically. In this case, data of a plurality ofbits may be consecutively written in one memory cell, of after data hasbeen written in all memory cells bit by bit, the data of remaining bitsmay be successively overwritten in the memory cells.

Thus, when two bits are stored in one memory cell, the first bit can beread out by accessing the word line only one time and the succeeding bitcan be read out by accessing the word lines only twice while changingthe level to read the data. Thus, the total number of accesses to theword line is decreased, and the time taken to read data is shortened.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is an explanatory diagram illustrating the concept (theconstitution of the address space) of a data storage system in amulti-level flash memory according to the present invention;

FIG. 2 is a block diagram illustrating an embodiment of the multi-levelflash memory according to the present invention;

FIG. 3 is an explanatory diagram illustrating the relationship betweenthe threshold values of memory cells and the stored data in themulti-level flash memory according to the present invention;

FIG. 4 is a diagram illustrating the relationship between the datastored hierarchically in a memory cell and the Z-address fordiscriminating them in the multi-level flash memory according to thepresent invention;

FIGS. 5(A) to 5(D) explanatory diagrams illustrating a change in thethreshold value of the memory cell at the time of programming anderasing in the multi-level flash memory according to the presentinvention;

FIG. 6 is. a schematic circuit diagram illustrating a memory array;

FIG. 7 is a schematic circuit diagram illustrating a data latchcircuit;.

FIG. 8 is a flowchart illustrating a procedure for reading themulti-level flash memory according to the embodiment;

FIG. 9 is a timing chart illustrating the timings of signals in thememory array at the time of reading the multi-level flash memory of theembodiment;

FIG. 10 is a flowchart illustrating a procedure for programming themulti-level flash memory of the embodiment;

FIG. 11 is a timing chart illustrating the timings of signals in thememory array at the time of programming the multi-level flash memory ofthe embodiment;

FIG. 12 is a flowchart illustrating a procedure for erasing the datafrom the multi-level flash memory of the embodiment;

FIG. 13 is a block diagram of a system using the multi-level flashmemory of the embodiment;

FIG. 14 is a block diagram schematically illustrating a secondembodiment of the multi-level flash memory according to the presentinvention;

FIG. 15 is a timing chart illustrating a time division method of a thirdembodiment of the multi-level flash memory according to the presentinvention;

FIG. 16 is a diagram illustrating the constitution of addressesaccording to a fourth embodiment in the multi-level flash memoryaccording to the present invention;

FIG. 17 is a schematic circuit diagram illustrating another embodimentof the memory array in the multi-level flash memory according to thepresent invention;

FIG. 18 is a schematic circuit diagram illustrating a further embodimentof the memory array in the multi-level flash memory according to thepresent invention;

FIG. 19 is a schematic circuit diagram illustrating a still furtherembodiment of the memory array in the multi-level flash memory accordingto the present invention;

FIG. 20 is a schematic circuit diagram illustrating a yet furtherembodiment of the memory array in the multi-level flash memory accordingto the present invention;

FIG. 21 is a diagram schematically illustrating the structure of amemory cell used for the flash memory of the embodiment and biasconditions for when a low threshold voltage state (logic “0”) is to beestablished;

FIG. 22 is a diagram schematically illustrating the structure of amemory cell used for the flash memory of the embodiment and biasconditions for when a high threshold voltage state (logic “1”) is to beestablished; and

FIG. 23 is an explanatory diagram illustrating the relationship betweenthe threshold voltage of a 4-value memory cell and the stored two-bitdata according to the invention of an earlier application.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 1 illustrates the concept of the address space in a memory capableof storing multilevel values in a memory cell, to which the presentinvention is applied.

Like the address system in a conventional general semiconductor memory,according to the present invention, a memory cell can be selectedaccording to the X-address and Y-address. According to the presentinvention, in addition, each memory is so constituted as to store dataof a plurality of bits and, besides, correspondingly a plurality of bits(each bit is expressed by a value of “0” or “1”) in a memory cell areselected or designated by an address (hereinafter referred to as aZ-address) different from the X-addresses and the Y-addresses(hereinafter referred to as a three-dimensional address system). In thethree-dimensional address system, three methods for applying theZ-address are conceivable: {circle over (1)} a method in which theZ-address is input so as to share the same input pins with the X— andY-addresses, {circle over (2)} a method in which an independentspecial-purpose input pin is provided, and {circle over (3)} a method inwhich the Z-address is input while being included in a command code.

The method {circle over (1)} in which the Z-address is input so as toshare an input pin with the X— and Y-addresses includes a method inwhich, when the number of bits is different between the X-addresses andthe Y-addresses, the pins not used when the address of the smallernumber of bits is input are used for the input of the Z-address; and anaddress multiplex method in which the X—, Y— and Z-addresses areinputted in a time division manner through common pins. The pin sharingmethod includes a method in which the pins for the data and command codeare shared for the input of the X—, Y— and Z-addresses. Among theabove-mentioned methods, in the method {circle over (2)} in which anindependent special-purpose input pin is provided, the signal may beregarded as not an address signal, but as a control signal or aselection signal (the reason is that when the number of bits of datastored in a memory cell is “2”, in particular, the address fordiscriminating it can be composed of only a single bit). Therefore, asignal for discriminating the bit in the memory cell should not beaffected by what it is called, but should be judged substantially.

FIG. 2 is a block diagram of an embodiment wherein the method {circleover (2)}, in which an independent special-purpose input pin isemployed, is applied to a flash memory, among the above-mentioned accessmethods.

The memory of this embodiment is so constituted that the operation mode,such as data writing, reading or erasing, is changed over depending upona command code input from an external controller, and the input pins ofthe command code are also used as data input/output pins I/O.

In FIG. 2, reference numeral 10 denotes a memory array in which memorycells constituted by MOSFETs having a floating gate are arranged in theform of a matrix, 11 denotes a multiplexer connected to input/outputpins I/O, 12 denotes a data input buffer which receives write datathrough the multiplexer 11, 13 denotes a data output buffer whichoutputs the data read out from the memory array 10 to an external unitthrough the input/output pins I/O, and 14 denotes a command decodecontrol circuit for generating internal control signals by decoding acommand code given from the external unit. The command decode controlcircuit 14 is equipped with a control function (sequencer) forsuccessively generating and outputting the control signals for thecircuits in the memory in order to execute the desired processingaccording to the command based upon the decoding result of the commandcode, and automatically executes the corresponding processing bydecoding the command code that is given. Like the control unit in acentral processing unit (CPU) of the microprogram type, the controlfunction is constituted by a ROM (read-only memory) in which are storeda series of micro instructions necessary to execute the command(instruction), and which generates the start address of the group ofmicro-instructions corresponding to the command code and gives it to amicro ROM (μROM) so that a micro program is started.

In FIG. 2, furthermore, reference numeral 15 denotes an X-addressdecoder which decodes the X-addresses that are input from the externalunit, enables a word line in the memory array 10 to assume a selectionlevel, and determines selection of the level (Vew1-3, Vrw1-3, Vwv1-3,Vww1-3, Vev1-3) according to the Z-address that is input; 16 denotes aY-address decoder which decodes the Y-addresses that are input from theexternal unit to generate a selection signal; 17 denotes a sense latchcircuit equipped with sense amplifiers, the number of which correspondsto the number of data lines, and which are connected to the data linesin the memory array 10, detects the levels of the data lines and holdsthe programming data to drive the data lines to a potentialcorresponding to the data; and 18 denotes a sequence of column switchesthat are selectively turned on by a selection signal from the Y-addressdecoder 15, and connects a data line corresponding to the Y-addresses inthe memory array 10 to the data input buffer 12 or to the data outputbuffer 13.

In addition to the above-mentioned circuits, the multi-level flashmemory of this embodiment is equipped with a control signal buffercircuit 19 which takes in control signals from the external unit andfeeds them to the command decode control circuit 14; an internal powersource-generating circuit 20 comprising charge pump circuits or the likefor generating voltages needed in the chip, such as reading voltagesVrw1-3, programming voltages Vww1-3, erasing voltages Vew1-3 andverifying voltages Vev1-3 based upon the power source voltage Vccsupplied from an external unit; and an all decision circuit 21 fordeciding whether the programming or the erasure has finished or notbased upon the data in the sense latch sequence 17 at the time of theprogramming or erasing.

The command decode control circuit 14 further has a function forgenerating and outputting a ready/busy signal R/B representing whetherthe device is accessible from the outside or not to the internalcircuits and to the external units.

Moreover, the flash memory of this embodiment shares external terminals(pins) I/O for input of the programming data and the commands. For thispurpose, the control signal buffer circuit 19 changes over themultiplexer 11 according to control signals input from the externalunit, discriminates the signal input through the input/output pins I/O,and feeds them to the data input buffer 12 or to the command decodecontrol circuit 14. The control signals inputted to the flash memory ofthis embodiment from the external unit include a reset signal RES, achip selection signal CE, a programming control signal WE, an outputcontrol signal OE, a command data enable signal CDE representing thatthe command code and the data are valid, a serial clock SC, etc. Thoughthere is no particular limitation, the flash memory of this embodimentis so constituted as to read the data of a row or word line held in thesense latch circuit 17 in synchronism with the clock SC, to send thedata to an external unit, and to transfer a row of the programming datainput from the external unit to the sense latch circuit 17 insynchronism with the clock SC. In this case, no Y-address is required.

FIG. 3 illustrates the relationship (definition) between the stored data(two bits) and the distribution of threshold values of an element whenone of four threshold values is stored in a memory cell. In thisembodiment, the data is written into a memory cell so as to assume anyone of the four threshold values, α or lower, α to β, β to γ, or γ orhigher. By the programming method that will be described later, a memorycell that has a threshold value of α or lower is defined as a cell forstoring 2-bit data “01”, the memory cell that has a threshold value of αto β is defined as a cell for storing 2-bit data “00”, the memory cellthat has a threshold value of β to γ is defined as a cell for storing a2-bit data “10”, and the memory cell that has a threshold value of γ orhigher is defined as a cell. for storing a 2-bit data “11”.

In FIG. 3, α, β and γ are values of the word line-reading levels at thetime of reading the data. Concrete values α, β and γ are determineddepending upon the power source voltage. As an example, when the powersource voltage is 3.3 V, α is 1.5 V, β is 2.0 V, and γ is 2.5 V. In FIG.3, furthermore, the hatched areas are inhibition regions havingthreshold values which are not effective in order to prevent erroneousreading, and α0, α1, β0, β1, γ0 and γ1 represent values of readinglevels in the verifying operation that is executed during programming orafter erasing. Out of the 2-bit data “**”, the first bit (high-orderbit) is the one (hereinafter referred to as the first programmed data)programmed first in time, and the second bit (low-order bit) is the one(hereinafter referred to as the second programmed data) programmed nextin time.

When 2-bit data are stored in a memory cell as described above, each ofthe bits can be selected by using the Z-address. That is, as shown inFIG. 4, when the Z-address is “0”, the first programming data isdesignated among the 2-bit memory data in the memory cell connected tothe selected word line, and, when the Z-address is “1”, the secondprogramming data is designated among the 2-bit memory data in the memorycell connected to the selected word line. When the first programmed datais read out, however, the selected word line assumes the potential β toexecute the reading operation one time as will be described later. Whenthe second programmed data is read out, the selected word line assumesthe potentials α and γ to execute the reading operation two times.

Next, the method of programming data (method of changing the thresholdvalue) applied to the flash memory of this embodiment will be describedwith reference to FIGS. 5(A) to 5(D).

As shown in FIG. 5(A), all memory cells are brought into the erasingstate (the threshold value has the second smallest value, i.e., about1.7 V, and the memory data is “00”) prior to programming the data. Inestablishing the erasing state, it is also possible to use a method inwhich all memory cells first have the data “11” of the greatestthreshold value stored therein and, then, the threshold value Vth in allmemory cells is returned to the erasing state “00”.

Next, the first programming data is written. At this moment, for thememory cells in which the data “1” is to be stored, a bias is applied tothem as shown in FIG. 5(B), and the programming is so effected that thethreshold value of the memory cells of 1.7 V, which represents theerasing state, assumes the highest threshold value of about 2.8 V. Atthe step where the writing of the first programming data is finished,there exists neither memory cells having the smallest threshold valuenor memory cells having the second largest threshold value. After theprogramming, the word line assumes the level γ1 to execute averification. The memory of this embodiment can be used in a manner suchthat the data are read by only writing the first programming data intoall memory cells, not writing the second programming data, and settingthe level of the word line to β. In this case, the Z-address necessarilyis “0” (or “1”). When each of the memory regions corresponding to “0”and “1” of the Z-address is defined as a plane, the above-mentionedmethod is the one that uses one plane only.

When two planes are used, the second programming data is written afterthe first programming data is written. At this moment as shown in FIG.5(C), the writing into the memory cell of which the first programmingdata is “0” is distinguished from the writing into the memory cell ofwhich the first programming data is “1”. In writing the firstprogramming data, as described above, a bias is applied to the memorycell of which the data is “1” so as to increase the threshold value(hereinafter referred to as up-writing). In writing the secondprogramming data, as shown in FIG. 5(C), on the other hand, the data iswritten so as to lower the threshold value (hereinafter referred to asdown-writing). In the case of the writing of the first programming data,it is possible to increase the threshold values of only the memory cellsinto which the data “1” among the memory cells of the state “00” isdesired to be written, in order to selectively establish the state “11”.It is, however, also possible to first increase the threshold values ofall memory cells which are in the state “00” and to decrease thethreshold value of only those memory cells of which the firstprogramming data is “0”.

In this embodiment, furthermore, when the first programming data is “0”and the second programming data is “1”, a bias is applied to the memorycells so as to lower the threshold value, so that the state is changedto a state of the smallest threshold value (the threshold value is about1.0 V, and the memory data is “01”). When the first programming data is“1” and the second programming data is “0”, a bias is applied to thememory cells so as to lower the threshold value, whereby the state ischanged to a state of the second largest threshold value (thresholdvalue is about 2.3 V, and the memory data is “10”). In this embodiment,though there is no particular limitation, the programming is, first, soeffected that the first programming data is “0” and the secondprogramming data is “1” and, then, the programming is so effected thatthe first programming data is “1” and the second programming data is“0”. The bias voltage or the programming pulse width of when thethreshold value is lowered to 1.0 V may be made different from that ofwhen the threshold value is lowered to 2.3 V. This is because theprogramming characteristics are not the same.

Meanwhile, when the first programming data is “0” and the secondprogramming data is “0”, or when the first programming data is “1” andthe second programming data is “1”, the data line is fed with no biasthat changes the threshold value of the memory cell. After theprogramming, verification is effected by causing the word line to assumethe levels α0 and γ0. Table 1 shows how the threshold value of thememory cell changes with the programming operation. The threshold valuesof each memory cell are Vth1, Vth2, Vth3 and Vth4 (Vth1<Vth2<Vth3<Vth4).TABLE 1 First programming data 0 0 1 1 Second programming data 1 0 0 1Change in 1st programming no no Vth2→ Vth2→ threshold change change Vth4Vth4 value 2nd programming Vth2→ no Vth4→ no Vth1 change Vth3 changeFinal threshold value Vth1 Vth2 Vth3 Vth4

To erase the data as shown in FIG. 5(D), up-writing of memory cellshaving the smallest threshold value (memory data “01”) is effected, andthe down-writing of memory cells having the largest threshold value(memory data “11”) and memory cells having the second largest thresholdvalue (memory data “10”) is effected. Thus, the threshold values of allmemory cells are changed into the second smallest state (memory data“00”). Besides, as will be described later, erasing of the secondprogrammed data and erasing of the first programmed data may beperformed. Verification after the erasing is effected by causing theword line to assume the levels α1 and β0.

FIG. 6 illustrates a concrete example of the memory array 10. The memoryarray of this embodiment is constituted by two mats. A sense latchcircuit SLT is disposed between the two mats. The data line in theunselected mat is precharged to a half-precharge level which is half theprecharge level of the data line in the selected mat. The sense latchcircuit is so constituted as to detect the data in a differential way.The memory array is arranged symmetrically with respect to the senselatch circuit SLT. Accordingly, FIG. 6 illustrates the sense latchcircuit SLT and only the mat on one side.

The memory array 10 of this embodiment includes, as shown in FIG. 6, aplurality of memory sequences MCC each constituted of n memory cells(MOSFETs having a floating gate) MC1 to MCn arranged in parallel in thedirection of a column, having sources and drains which are commonlyconnected, and the sequences are arranged in the row direction(direction of word lines WL) and in the column direction (direction ofmain data lines DL). In each memory sequence MCC, the drains and sourcesof n memory cells MC1 to MCn are connected to a common subdata line SDLand to a common subsource line SSL. The subdata line SDL is connected tothe main data line DL through a switching MOSFET Qs1. The subsource lineSSL can be connected to a grounding point or to a negative voltagethrough a switching MOSFET Qw2 and a common source line CSL.

Among the plurality of memory sequences MCC, those arranged in thedirection of word lines are formed in the same well region WELL over thesemiconductor substrate. To increase the threshold values of the memorycells, a negative voltage such as −3 V is applied to the well regionWELL and a voltage such as 10 V is applied to the word lines sharing thewell region, to enable the upward writing. To erase the data, allswitching MOSFETs Qst1, Qst2 sharing the well region are turned on, andthe negative voltage of −3 V is applied to the sources and drains of thememory cells.

To lower the threshold value of the memory cell, on the other hand, anegative voltage such as −10 V is applied to the word line to which amemory cell to be selected is connected, a voltage such as 4 V isapplied to the main data line DL corresponding to the memory cell to beselected, the switching MOSFET Qs1 on the subdata line SDL to which theselected memory cell is connected is turned on, and a voltage of 4 V isapplied to the drain region. However, the switching MOSFET Qs2 on thesubsource line SSL is kept off.

To read the data, voltages such as 1.5 V, 2.0 V or 2.5 V are applied tothe word line to which is connected a memory cell that is to beselected, the main data line DL corresponding to the memory cell to beselected is precharged to a potential such as 1 V, and the switchingMOSFET Qs1 on the subdata line SDL to which the selected memory cell isconnected is turned on. The switching MOSFET Qs2 on the subsource lineSSL is turned on, and the ground potential is applied thereto. At thismoment, when the selected memory cell is on, the electric charge on thecorresponding data line is discharged into the common source, and thepotential decreases. The potential is amplified through the sense latchcircuit SLT connected to an end of the main data line DL. At the. timeof reading the data, the sense latch circuit SLT detects the level ofthe data line and holds it. At the time of programming, the sense latchcircuit SLT holds the programming data and applies a potentialcorresponding to the data that is held to the data line.

FIG. 7 illustrates the sense latch circuits SLT connected to the datalines. As shown, each sense latch circuit SLT has a sense amplifier SAin which the input/output terminals of the two CMOS inverters aremutually connected. Between the sense amplifiers SA and the memory array10, there are provided precharging MOSFETs Qp0, Qp1, data transferMOSFETs Qt0, Qt1 capable of connecting/cutting off one input/outputterminal of the sense amplifier SA and the main data line DL, datainversion circuits DIC, resetting MOSFETs Qr0, Qr1, a MOSFET Qj for alldecision, a column switching MOSFETs Qc, a data filter circuit DFC forrecognizing the first programmed data, and the like.

In FIG. 7, the reason why two data line precharging MOSFETs Qp, two datatransfer MOSFETs Qt, two data inversion circuits DIC and two resettingMOSFETs Qr are shown is that those connected to oddly-numbered datalines and those connected to evenly-numbered data lines are separatelyshown. A selection signal from the Y-decoder circuit is applied to thegate of the column switching MOSFET Qc, and the data line is connectedto the data input buffer 12 and to the data output buffer 13 through thecolumn switching MOSFET Qc and the input/output line I/O. Though notshown, each sense amplifier SA is connected to the common power sourceline and to the ground line via power source feeding/cutting offswitching MOSFETs. The sense amplifier SA is activated upon turningthese MOSFETs on and is inactivated upon turning these MOSFETs off.

The source terminal of the precharging MOSFET Qp0 or Qp1 is connected tothe main data line DL, the drain terminal thereof is connected to thevoltage feeding line VL0 or VL1, and the gate terminal thereof is fedwith a precharge control signal RPC0 or RPC1. At the time of reading thedata, the precharging MOSFET Qp0 or Qp1 is turned on to precharge themain data line DL to a level such as 1 V. The data transfer MOSFETs Qt0and Qt1 are connected between the main data line DL in the memory array10 and the main data lines DLs on the sense amplifier SA side, and thegate terminals thereof are fed with transfer control signals TR0, TR1.After the word line is raised, the data transfer MOSFETs Qt0 and Qt1 areturned on to transmit the level of the data line to the sense amplifierSA. At the time of programming, meanwhile, the data transfer MOSFETs Qt0and Qt1 are turned on, so that the programmed data held in the senseamplifier SA is transmitted to the main data line DL. In the datainversion circuit DIC, two MOSFETs Qd1, Qd2 are connected in seriesbetween the main data line DL and the voltage feeding line UP. Controlsignals PC0, PC1 are applied to the gate terminal of the MOSFET Q1, andthe main data line DLs on the sense amplifier SA side is connected tothe gate terminal of the MOSFET Qd2. The drain terminals of theresetting MOSFETs Qr0, Qr1 are connected to the main data line DLs, thesource terminals thereof are connected to the ground lines GL0, GL1, andthe gate terminals thereof are fed with data reset signals RSA0, RSA1.As Qd1 and Qd2 are turned on, the main data line DLs is. discharged tothe ground potential.

The MOSFET Qj for all decision is connected between the sense lines EC0,EC1 and the ground line GL2, the gate terminal thereof is connected tothe main data line DLs on the sense amplifier SA side, and a currentsense circuit CSC constituting the all decision circuit 21 is connectedto one end of each of the sense lines EC0, EC1. Upon detecting whetherthe data lines are all at the low level or not, it is determined whetherthe data read out are all “0”. That is, when any one of the data readout is “1”, the corresponding MOSFET Qj is turned on, and a currentflows to the ground point through the sense lines EC0, EC1, and is hencedetected by the current sense circuit CSC.

The data file circuit DFC for recognizing the first programming data isconstituted by MOSFETs Qf1, Qf2 connected in series between the voltagefeeding line DCP and one input/output terminal of the sense amplifierSA, and a transfer MOSFET Qf3 connected in series with the columnswitching MOSFET Qc. A control signal DC0 is applied to the gateterminal of the MOSFET Qf1, and a control signal DC1 is applied to thegate terminal of the MOSFET Qf2. The MOSFETs Qf1 to Qf3 are controlledby the control signals and by the data held in the sense amplifier SA,in order to write the second programming data that corresponds to theabove-mentioned first programming data. That is, the control signal DC0is set to the high level and the DC1 is set to the low level to turn theQf1 on and the Qf2 off, whereby a signal of the high level is suppliedto the gate of Qf3 to thereby connect all data lines to the input/outputlines I/O. Meanwhile, the control signal DC0 is set to the low level andthe DC1 is set to the high level to turn the Qf1 off and the Qf2 on,whereby a signal of a level corresponding to the data held in the senseamplifier SA is fed to the gate of Qf3, and the data lines areselectively connected to the input/output lines I/O.

Next, with reference to a flowchart of FIG. 8 a procedure for readingthe data from the memory cell of the embodiment will be described. FIG.9 illustrates changes in the signal lines in the memory array and in thesense latch circuit which occur when the data is to be read out. Symbolsshown in FIG. 8 correspond to symbols of signals shown in FIGS. 6 and 7.R or L as the last letter of some of the symbols is used fordiscriminating whether the signal relates to the upper mat or the lowermat on both sides of the sense latch circuit SLT. PRL and PRR representsignals for precharging the data lines, and correspond to the code RPCin FIG. 7. Furthermore, DPB denotes an on/off control signal of thepower source for sense latch.

Referring to FIG. 8, the reading operation is started upon the input ofa read command. When the command that is input is a read command, anaddress signal inputted just after or simultaneously with the command(step S1) is fetched. It is then decided whether the data to be read outis the first programmed data or the second programmed data in the memorycell based upon the Z-address among the addresses that are fetched (stepS2). When it is decided that the command is for reading the firstprogrammed data, the level of the word line is set to β which is theintermediate read-out level, the main data line DL is precharged, andthe X-address is decoded to raise the word line WL (steps S3, S4). Atthis moment, furthermore, the switching MOSFET Qs1 of the subdata lineis turned on.

Thus, the level of the data line is held or discharged depending uponthe first programmed data in the memory cell connected to the selectedword line and, hence, the switching MOSFET Qs2 on the subsource line andthe data transfer MOSFET Qt are turned on, so that the level of the dataline is transmitted to the sense amplifier SA and the power source issupplied to the sense amplifier to activate it (step S5). Thus, theread-out data is amplified and held in the sense amplifier, whereby thecolumn switch Qc is turned on, and the read-out data is sent to the dataoutput buffer and output to an external unit (step S6).

When it is decided that the data to be read out at the step S2 is thesecond programmed data in the memory cell, the procedure proceeds to astep S7 whereby the level of the word line is set to γ which is thehighest read-out level, the main data line DL is precharged and, at thesame time, the X-address is decoded to raise the word line WL (step S8).Then, the level of the data line is transmitted to the sense amplifierSA to activate it and to amplify the data that is read out (step S9).Then, the data inversion circuit DIC is controlled, the data on the dataline is inverted by utilizing the data held by the sense amplifier SAand is used for the precharging operation at the next reading time (stepS10). Thereafter, the level of the word line is set to α which is thelowest read-out level, and the X-address is decoded to raise the wordline WL (step S11, S12). Thereafter, the level of the data line istransmitted to the sense amplifier SA, and the data that is read out isamplified by the sense amplifier (step S13). Next, the data inversioncircuit DIC is controlled and the data on the data line is inverted byutilizing the data held in the sense amplifier SA (step S14). The datais amplified again by the sense amplifier SA, whereby the desired secondprogramming data is held by the sense amplifier. Therefore, the columnswitch Qc is turned on to send the read-out data to the data outputbuffer and to output it to an external unit (step S15).

In the following Table 2, L and H represent changes in the level of thedata line which occur when the second programmed data (1001) is read outfrom the memory cells where the data “01”, “00”, “10” and “11” arestored at the above-mentioned steps S8 to S15. Here, L represents thatthe data line is at the low level and H represents that the data line isat the high level. For comparison, in the lowest space, there are shownthe levels of the data line which occur when the first programmed data(0011) are read out from the memory cells stored with the same data byallowing the word line to be at the level β. It will be understood fromTable 2 that the data are correctly read out by the control according tothe flowchart of FIG. 8. TABLE 2 1 Stored data 01 00 10 11 2 read outwith γ L L L H data inverted H H H L read out with α L H H L datainverted H L L H read-out data  1  0  0  1 3 read out with β L L H H

Next, the procedure for writing data into the memory cell will bedescribed with reference to the flowchart of FIG. 10. It is assumed thateach memory cell has been erased and has the second lowest thresholdvalue prior to starting the programming. FIG. 11 illustrates changes inthe signal lines in the memory array and in the sense latch circuit inprogramming the data. Symbols shown in FIG. 11 correspond to the symbolsof signals shown in FIGS. 6 and 7. R or L as the last letter of some ofthe symbols is used for discriminating whether the signal relates to theupper mat or the lower mat on both sides of the sense latch circuit. YGidenotes a gate control signal of the column switch Qc, and PWL denotes asignal for precharging the data line and corresponds to the symbol PC inFIG. 7.

As shown in FIG. 10, the programming operation is started upon thereceipt of a write command from an external unit. When the command thatis input is a write command, an address signal and programming datainputted just after or simultaneously with the command (step S21) arefetched. Then, based upon the Z-address among the addresses that arefetched, it is decided whether the programming corresponds to the firstprogramming or to the second programming of the memory cell (step S22).When it is determined to be the first programming, the programming datais transferred to the sense latch (step S23). In this case, the datafilter circuit DFC is so controlled as to turn Qf1 on and to turn all ofQf3 on, and unconditionally transfers the programming data to the senseamplifier SA. Next, the programming is effected so as to increase thethreshold value of the memory cell of which the programming data is “1”(up-writing)(step S24).

The operation of increasing the threshold value of the memory cell iseffected by applying, for example, 10 V to the word line and, forexample, −3 V to the well region. In the memory array constituted as inthe above-mentioned embodiment, all memory cells in a sector share theword lines and the well regions and, hence, it is impossible toselectively increase the threshold value of the memory cells. In theabove-mentioned up-writing operation (step S24), therefore, thethreshold value of all memory cells sharing the word lines in a sectoris first increased. That is, the operation is effected so that the state“00” of the memory cells is shifted to the state “11”. Then, by usingthe data latched by the sense latch SA, the level of the selected wordline is so set that a bias voltage shown in FIG. 21 is applied to memorycells that are desired to be placed in the state “00”, and the switchingMOSFET Qs1 and the data transfer MOSFET Qt are turned on to set thelevel of the selected data line, thereby discharging the electric chargefrom the floating gate and lowering the threshold value.

Thereafter, the level of the word line connected to the memory cell intowhich the data is written is set to β0 to raise the selected word lineWL and to execute the verification (step S25). The verification is thesame as the above-mentioned operation for reading the first programmeddata and will be not described in detail. After the verification, it isdetermined by the current sense circuit CSC whether the data latched byall sense amplifiers SA are all “0” or not (step S26). When the normallyprogrammed memory cell is verified, the data held by the sense amplifierchanges from “1” to “0”. The data “1” remains in the sense amplifiercorresponding to a memory cell which has not been sufficientlyprogrammed. When all of the data of the sense latches are not “0” theprocedure returns to the step S24, where the programming is effectedagain by using the data held by the sense latches. The programmingoperation ends when it is decided through the verification operationthat the data of the sense latches are all “0”.

On the other hand, when it is decided that the programming to beexecuted at the step S22 is the second programming of the memory cell,the procedure proceeds to a step S27. In this embodiment,as describedearlier, the second programming must be separately executed dependingupon the first programmed data. At the step S27, therefore, the firstprogrammed data is read out first. The level of the word line at thismoment is β. To read the data, the main data line DL is precharged and,then, the word line WL is raised in the same manner as during thereading operation. Thereafter, the data inversion circuit DIC iscontrolled to invert the data read out by the sense amplifier SA (stepS28).

Next, the data filter circuit DFC is controlled (Qf2 is turned on) sothat the sense amplifier SA fetches the input programming data accordingto the data held by the sense amplifier SA (step S29). At this moment,data representing the logical product (AND) of the inverted read-outdata and the input data is held by the sense amplifier SA. The followingTable 3 shows changes in the data which occur when the first programmeddata is read out from a memory in which the data “0011” is stored, andthe second programming data “1100” is input thereto at theabove-mentioned steps S27 to S29. It will be understood from Table 3that the data “1” remains only in a sense amplifier corresponding to amemory cell in which the data “00” is changed to “01” in the upper partof FIG. 5(C). TABLE 3 First programmed data 0 0 1 1 Inverted data 1 1 00 Input data 1 0 0 1 Final data 1 0 0 0

Thereafter, the level of the selected word line and the level of theselected data line are so set that a bias voltage shown in FIG. 21 isapplied to a memory cell in which the programmed data held by the senseamplifier is “1”, and the switching MOSFET Qs1 and the data transferMOSFET Qt are turned on in order to discharge the electric charge fromthe floating gate and to lower the threshold value (step S30).

Thereafter, the level of the word line through which programming isperformed is set to α0, and the selected word line WL is raised toexecute the verification (step S31). After the verification, it isdecided by the current sense circuit CSC whether the data of all senselatches are all “0” (step S32). When the memory cell that is normallyprogrammed is verified, the data held by the sense amplifier SA changesfrom “1” to “0”, and the data “1” remains in the sense amplifier SA thatcorresponds to the memory cell which has not been sufficientlyprogrammed. When the data of the sense latches are not all “0”,therefore, the procedure returns to the step S30, where the programmingis effected again by using the data held in the sense latches. When itis decided by the verification operation that the data of the senselatches are all “0”, the first programming operation ends.

Next, the procedure proceeds to a step S33, and the second programmingdata is fetched again by the sense amplifier SA. At this moment, thedata filter circuit DFC is so controlled as to turn the MOSFET Qf1 onand to turn all MOSFETs Qf3 on, and unconditionally transfers theprogramming data to the sense amplifier. Then, the data inversioncircuit DIC is controlled to invert the data read out by the senseamplifier SA (step S34). Then, the data line is precharged by using thedata held by the sense amplifier SA to read out the data (step S35). Atthis moment, the level of the word line is β which is the same level asfor reading out the first programmed data. Therefore, the memory cell ofwhich the first programmed data is “0”, is turned on, whereby the dataline is discharged and the data in the corresponding sense amplifierturns to “0”. The following Table 4 shows changes in the data whichoccur when the first programmed data is read out from a memory cell inwhich the data “0011” is stored, and the second programming data “1100”is input thereto at the above-mentioned steps S33 to S35. It will beunderstood from Table 4 that the data “1” remains only in a senseamplifier corresponding to a memory cell in which the data “11” ischanged to “10” in the lower part of FIG. 5(C). TABLE 4 First programmeddata 0 0 1 1 Input data 1 0 0 1 Inverted data 0 1 1 0 Final data 0 0 1 0

Thereafter, the level of the selected word line and the level of theselected data line are so set that a bias voltage shown in FIG. 21 isapplied to a memory cell in which the programmed data held by the senseamplifier is “1”, and the switching MOSFET Qs1 and the data transferMOSFET Qt are turned on in order to discharge the electric charge fromthe floating gate and to lower the threshold value (step S36).

Thereafter, the level of the programmed word line is set to γ0, and theselected word line WL is raised to perform verification (step S37).After the verification, it is determined by the current sense circuitCSC whether the data of all sense latches are all “0” (step S38). Whenthe memory cell that is normally programmed is verified, the data heldby the sense amplifier SA changes from “1” to “0”, and the data “1”remains in the sense amplifier that corresponds to the memory cell whichhas not been sufficiently programmed. When the data of the sense latchesare not all “0”, therefore, the procedure returns to the step S36, wherethe programming is effected again by using the data held in the senselatches. When it is decided by the verification operation that the dataof the sense latches are all “0”, the programming operation ends.

In the above description, to write the first programming data(up-writing) in the above-mentioned embodiment, the threshold value ofonly the memory cell which is desired to be maintained in the state “00”is lowered after the threshold value of all memory cells is firstincreased. It is, however, also possible to execute a programmingoperation which selectively increases the threshold value of only thememory cell into which the first programming data “1” is desired to bewritten by the method described below.

That is, the only thing to be done is that a voltage is applied to thedrain of a memory cell of which the threshold voltage is not to beincreased, and a channel is formed just under the gate electrode toblock the injection of an electric charge into the floating gate.Concretely speaking, a voltage of, for example, 10 V is applied to theword line and a voltage of, for example, −3 V is applied to the wellregion. Then, a voltage of, for example, 3 V is applied to the drain ofa memory cell which is not to be changed from the state “00” to thestate “11”, and a voltage of, for example, −3 V is applied to the drainof a memory cell which is to be changed from the state “00” to the state“11”. The level of the word line at the time of verification is γ1.

Next, the procedure for erasing the data stored in the memory cell willbe described with reference to the flowchart of FIG. 12.

As shown in FIG. 12, the erasing operation is started upon the input ofan erase command from an external unit. When the command that isinputted is an erase command, address signals are inputted just after orsimultaneously with the command (step S41). It is then decided, based onthe Z-address among the fetched addresses, whether the data to be erasedis the first programmed data or the second programmed data in the memorycell (step S42). When it is decided that it is the first programmeddata, the second programmed data is read out from a memory celldesignated by the X-address and is output to the outside of the memory(step S43). The second programmed data output to the external unit isstored in the buffer memory by a controller or the like.

Next, the first programmed data is read out from the memory celldesignated by the input address and held in the sense latch (step S44).By using the thus held data, the level of the selected word line and thelevel of the selected data line are so set that a bias voltage shown inFIG. 21 is applied to a memory cell of which the read-out data is “1”,whereby the switching MOSFET Qs1 and the data transfer MOSFET Qt areturned on, discharging the electric charge from the floating gate andlowering the threshold value to effect the erasing (step S45).

Thereafter, the level of the erased word line is set to β0 to raise theselected word line WL and to perform verification (step S46). Theverification operation is the same as the above-mentioned operation forreading the data (FIG. 8), and will be not described in detail. Afterthe verification, it is determined by the current sense circuit CSCwhether the data of all sense latches are all “0” or not (step S47).When the normally programmed memory cell is verified, the data held inthe sense latch changes from “1” to “0” and the data “1” remains in thesense latch corresponding to the memory cell that has not been properlyprogrammed. When the data of the sense latches are not all “0”, theprocedure returns to the step S45 where the erasing is effected again byusing the data held by the sense latch.

When it is decided through the verification operation that the data ofthe sense latches SA are all “0”, the level of the word line is set toal and the selected word line WL is raised to perform verification (stepS48). After the verification, it is determined whether the data of allsense latches are all “1” (step S49). The decision of all “1” is easilyeffected by an all-decision circuit constituted by a MOSFET Qj providedon the opposite side of the sense latch SA and a current sense circuitCSC, or by providing a similar circuit constituted by a P-channel MOSFETinstead of the MOSFET (N-channel) Qj of FIG. 7. When the data of thesense latches are not all “1”, the procedure proceeds to a step S50,where the programming is so effected, by using the data held by thesense latch, as to increase the threshold value of the memory cell ofwhich the read-out data is “0” and, then, the verification is effectedagain (step S51). When it is decided through the verification operationthat the data in the sense latches are all “0” (step S52), the secondprogrammed data stored in the external buffer memory is input andwritten into the memory (step S53). This programming operation isexecuted according to a procedure similar to the flowchart of FIG. 10.

When it is decided that the data to be erased at the step S42 is thesecond programmed data of the memory cell, the procedure proceeds to astep S60 for erasing the second programmed data. The process of erasingthe second programmed data is carried out by substantially the sameprocedure as the process of erasing the first programmed data at thesteps S41 to S51. The difference is that the first programmed data isread out prior to erasing the second programmed data erasing the secondprogrammed data, the erasing for increasing the threshold value iseffected separately from the erasing for lowering the threshold valuedepending upon the first programmed data. Since the erasing forincreasing the threshold value and the erasing for lowering thethreshold value are separately executed depending upon the firstprogrammed data, a control operation similar to the one executed at thesteps S27 to S38 in the flowchart for executing the programming of FIG.10 is adopted.

FIG. 13 illustrates the constitution of a system using the multi-levelflash memory of the above-mentioned embodiment.

Though there is no particular limitation, the system of this embodimentis constituted by a microcomputer (CPU) 110 for controlling the wholesystem, a read-only memory (ROM) 120 for storing the program and fixeddata of the system, a random access memory (RAM) 130 in/from which datacan be randomly written/read to provide a working area to the CPU 110, alocal memory 140 including multi-level flash memories 141, 142, . . . ofthe above-mentioned embodiment, a memory controller 150 for controllingthe read, write and erase operations on the data in the local memory140, and a buffer memory 160 used for saving the second programmed dataor the first programmed data at the time of erasing or rewriting thedata in the local memory 140.

The CPU 110, the ROM 120, the RAM 130 and the memory controller 150 areconnected together through a main bus 170 which includes a control bus171, an address bus 172 and a data bus 173. The flash memories 141, 142,. . . , the memory controller 150 and the buffer memory 160 areconnected together through a local bus 180 which includes a clock bus181, an address bus 182 and an I/O bus 183. Though there is noparticular limitation, these ICs and the bus are mounted on a singleboard such as a printed wiring board.

The memory controller 150 includes an interface circuit 151 forinterface with the CPU 110; a command controller 152 which generates andoutputs a read-out command, a write command, an erase command and a datatransfer clock to the flash memories 141, 142, . . . in response to aninstruction from the CPU 110; an address controller 153 which convertsaddresses into physical addresses of the flash memories 141, 142, . . .based upon the logical addresses output from the CPU 110, and convertsthem into the above-mentioned three-dimensional addresses; and a dataI/O controller 154 which transfers the data read out from the flashmemories 141, 142, . . . to the RAM 130, and transfers the programmingdata from the RAM 130 to the flash memories 141, 142, . . . .

FIGS. 14 to 17 illustrate other embodiments of the system fordiscriminating data depending upon the hierarchy in the memory cell(corresponding to the method based on the Z-address of theabove-mentioned embodiment).

Among them, FIG. 14 illustrates a constitution for inputting, in a timedivision manner, the Z-address together with the data, command,X-address and Y-address through the input/output pins I/O, instead ofinputting the Z-address through special-purpose external terminals (seesymbol AZ of FIG. 2). The Z-address inputted to the input/output pinsI/O is fed to an X-address decoder 15 through a multiplexer 11.Likewise, a X-address and a Y-address are fed to the X-address decoder15 and to the Y-address decoder 16 through the multiplexer 11. Commandor data and an address are distinguished from each other using a controlsignal CDE from an external unit. The command and data are distinguishedfrom each other in a manner such that the command is inputted insynchronism with a write enable signal WE, and the data is inputted insynchronism with a serial clock SC.

Relative to the address multiplexing method in which the above-mentionedpins are commonly used, there can be contrived a method for separatelyfetching the X-address and the Y-address at different timings and amethod for fetching the Z-address by utilizing a free bit in theX-address as shown in FIG. 15. The method shown in FIG. 16 serves toillustrate the address constitution when the Z-address (1 bit) is to befetched by using 1 bit between the free two bits of the highest order inthe case where an X-address of 14 bits is to be fetched in twooperations by using eight input/output pins I/O.

It is also allowable to input the Z-address by including it in acommand, instead of including the Z-address in the X-address. Moreover,the read command, write command and erase command may be separatelyprepared for each of the data depending the hierarchy in the memorycell. Even in this case, as shown in FIG. 14, there can be contrived amethod for inputting the address and the command in a time divisionmanner as shown in FIG. 14 and a method for inputting them throughseparate external terminals as shown in FIG. 2. In addition to theaddress or command, furthermore, a control signal or a selection signalmay be used for discriminating the data depending upon the hierarchy inthe memory cell.

FIGS. 17 to 20 illustrate other constitutions of the memory array 10. Inthe memory array of the above-mentioned embodiment (see FIG. 6), thesources of n memory cells MC arranged in the direction of the data linesare connected to the common subsource line SSL, the drains are connectedto the common subdata line SDL, the subdata line SDL is connected to thedata line through the switching MOSFET Qs1, and the subsource line SSLis connected to the common source line CSL through the switching MOSFETQs2. In the embodiment of FIG. 17, on the other hand, the memory cellsMC are arranged in pairs in the direction of data lines, a common drainCD of each pair is connected to a corresponding main data line DL, andthe sources of the memory cells in the direction of the word lines WLare connected to the common source line CSL for every memory row. Thesense latch circuit SLT connected to each data line is the same as thatof the memory array (see FIG. 6) of the above-mentioned embodiment. Inthe memory array of this embodiment, the reading/programming operationsare carried out in quite the same manner as that of the memory array(see FIG. 6) of the above-mentioned embodiment, except for the controloperation performed by the switching MOSFETs Qs1, Qs2. It is furtherpossible to provide a subdata line and a subsource line to be controlledby the switching MOSFETs Qs1 and Qs2.

FIG. 18 is a memory array of the so-called NAND type. N memory cells MC1to MCn are so arranged in the direction of the main data line DL thattheir channels are connected in series, one end thereof (lower end inthe drawing) is connected to the main data line DL via the switchingMOSFET Qs1, and the other end (upper end) thereof is connected to thecommon source line CSL via the switching MOSFET Qs2. In this embodiment,the potential of the word line other than the selected word line is setto such a high level that the switching MOSFETs are turned onirrespective of the threshold value of the memory cell connectedthereto, and the selected word line is set to a potential correspondingto the first programmed data or the second programmed data, therebyreading or programming the data. Thus, the selected memory cell performsa reading/programming operation.

Referring to FIG. 19, the n memory cells MC1 to MCn arranged in thedirection of the main data line DL are so arranged that their channelsare connected in series, the common sources and the common drains arealternatingly connected to the subdata lines SDL and to the subsourcelines SSL, and the subdata lines SDL are connected to the correspondingmain data lines DL through the switching MOSFET Qs1. This embodiment isthe same as that of the memory array (see FIG. 6) of the above-mentionedembodiment, except that the mutually adjacent memory cells in thedirection of the main data line DL share the source and the drain, andno switching MOSFET Qs2 is used. The reading/programming operations arecarried out by the same control except for the control of Qs2. It is,however, also possible to provide Qs2 between the subsource line SSL andthe common source line CSL.

FIG. 20 illustrates a modification of the above-mentioned embodiment(FIG. 6) and is the same in that the drains of the n memory cells MCarranged in the direction of the data lines are connected to a commonsubdata line SDL which is connected to the data line through theswitching MOSFET Qs1. In this embodiment, however, the memory cells areconnected in pairs in the direction of the word lines, and their commonsources are connected to the subsource lines SSL to decrease the numberof the subsource lines SSL. The subsource line SSL is connected to thecommon source line CSL through the switching MOSFET Qs2. The sense latchcircuit SLT may be constituted quite in the same manner as that of FIG.7, and performs the reading/programming operation by the same control.

As described above, in the embodiments, in a nonvolatile semiconductormemory device in which data of multiple levels are stored in memorycells by setting a plurality of threshold values, the bits of 2-bit dataare separately written into one memory cell depending upon the addresssignal or the control signal. At the time of reading the data,therefore, the first bit (first programmed data) is read out byaccessing the word line only one time, and the second bit (secondprogrammed data) is read out by accessing the word line two times whilechanging the level. This makes it possible to decrease the total numberof accesses to the word line and to shorten the time taken to read thedata.

In the above-mentioned embodiments, furthermore, a data inversioncircuit is provided between a data line in the memory array and thesense amplifier that amplifies the read-out data, making it possible toefficiently read out the second programmed data.

In the above-mentioned embodiments, furthermore, a data filter circuitis provided between the data input buffer and the sense amplifier tocontrol the input of programming data depending upon the data read. outby the sense amplifier, making it possible to efficiently write thesecond programming data in accordance with the first programming data.

In the above-mentioned embodiments, furthermore, the address signal fordiscriminating the data depending upon the hierarchy in the memory cellis input in a time division manner together with the command or thedata, making it possible to decrease the number of the required externalterminals (pins).

In the foregoing, the invention has been described by way of variousembodiments, but the invention is in no way limited to them and can bemodified in a variety of ways without departing from the spirit andscope of the invention. For example, the above-mentioned embodimentshave dealt with the case where 2-bit data is stored in a memory. Theinvention, however, can also be adapted even to a non-volatile memory inwhich data of three or more bits is stored in a memory cell.

In the above-mentioned embodiments, furthermore, the memory cell havingthe second lowest threshold value is regarded as a memory cell of theerased state. However, a threshold value of any other level may beemployed to establish the erased state. In the embodiments, furthermore,the threshold value is changed by effecting the programming of a memorycell that corresponds to a sense amplifier which is holding the data“1”. It is, however, also possible to change the threshold value byeffecting the programming of a memory cell that corresponds to a senseamplifier which is holding the data “0”.

The foregoing description has been made relative to the case where thepresent invention is applied to a flash memory.

However, the present invention is in no way limited thereto only, butcan be utilized for general nonvolatile memory devices using FAMOSs asmemory elements, as well as to semiconductor devices equipped withmemory cells having a plurality of threshold values.

1. A nonvolatile memory comprising: a plurality of memory cells; and aplurality of word lines, each of which is coupled to corresponding onesof said memory cells, wherein said nonvolatile memory is capable ofreceiving a plurality of commands which includes a write commandaccompanied with write address information, wherein, when saidnonvolatile memory receives said write command accompanied with firstaddress information as said write address information and first data,said nonvolatile memory selects a first word line according to saidfirst address information, and stores said first data in said memorycells coupled to said first word line, wherein, when said nonvolatilememory receives said write command accompanied with second addressinformation as said write address information and second data, saidnonvolatile memory selects said first word line according to said secondaddress information, further storing said second data in said memorycells coupled to said first word line, wherein, after storing said firstdata, each of said memory cells coupled to said first word line has onestate of a first state or a second state, and wherein, after storingsaid second data, each of said memory cells coupled to said first wordline has one state of said first state, said second state, a third stateor a fourth state.
 2. A nonvolatile memory according to claim 1, whereina memory cell coupled to said first word line has one state of saidfirst state or said second state according to data of said first data tobe stored, wherein said memory cell coupled to said first word line hasone state of said first state or said third state according to data ofsaid second data to be stored, when said memory cell has said firststate after storing data of said first data to be stored, and whereinsaid memory cell coupled to said first word line has one state of saidsecond state or said fourth state according to data of said second datato be stored, when said memory cell has said second state after storingdata of said first data to be stored.
 3. A nonvolatile memory accordingto claim 2, wherein said commands further include a read commandaccompanied with read address information, wherein, when saidnonvolatile memory receives said read command accompanied with saidfirst address information as said read address information, saidnonvolatile memory selects said first word line according to said firstaddress information, and outputs said first data stored in said memorycells coupled to said first word line, and wherein, when saidnonvolatile memory receives said read command accompanied with saidsecond address information as said read address information, saidnonvolatile memory selects said first word line according to said secondaddress information, and outputs said second data stored in said memorycells coupled to said first word line.
 4. A nonvolatile memory accordingto claim 2, wherein said commands further include an erase commandaccompanied with an erase address information, wherein, when saidnonvolatile memory receives said erase command accompanied with saidfirst address information as said erase address information, saidnonvolatile memory selects said first word line according to said firstaddress information, erases said first data stored in said memory cellscoupled to said first word line but does not erase said second datastored in said memory cells coupled to said first word line, andwherein, when said nonvolatile memory receives said erase commandaccompanied with said second address information as said erase addressinformation, said nonvolatile memory selects said first word lineaccording to said first address information, erases said second datastored in said memory cells coupled to said first word line but does noterase said first data stored in said memory cells coupled to said firstword line.